home *** CD-ROM | disk | FTP | other *** search
/ .net 2000 August / NET74.ISO / pc / Software / JavaApplet / AnfyMacBeta1.sea / Anfy for Macintosh / anjavapp / treemenu / treemenu.txt < prev    next >
Encoding:
Text File  |  1999-07-05  |  13.1 KB  |  318 lines  |  [TEXT/ttxt]

  1.  
  2.           Tree Menu - Copyright (C) by Fabio Ciucci 1998/99
  3.  
  4.  
  5. This applet is a navigational menu, which emulates the windows tree 
  6. scructures. It can display unlimited menus and submenus, with any kind
  7. of icons. The link feature works only when you are registered by paying
  8. for the shareware. 
  9.  
  10. This applet contains code by Dolf van der Schaar who is used under a 
  11. licence.
  12.  
  13. *************************************************************************
  14.  
  15. NECESSARY FILES
  16.  
  17. As well as icon images, and optional background and/or foreground images,
  18. the following 3 ".class" files must be uploaded: 
  19.  
  20. treemenu.class
  21. Lware.class
  22. anfy.class
  23.  
  24. Plus, treemenu.jar for speedy loading on recent browsers.
  25.  
  26. **************************************************************************
  27.  
  28. Insert the <applet> tag in your html document as follows to add this applet
  29. to your page (Comments after the ";" symbol are code explanations and
  30. acceptable min/max values. They are not part of the applet language):
  31.  
  32.  
  33. <applet archive="treemenu.jar" code="treemenu.class" width="200" height="280">
  34. <param name="credits" value="Applet by Anfy Team (www.anfyteam.com)">
  35. <param name="regcode" value="NO">         ; Registration code (if you have it)
  36. <param name="regnewframe" value="YES">    ; Reglink opened in new frame?
  37. <param name="regframename" value="_blank"> ; Name of new frame for reglink
  38. <param name="scrollSpeedInGoing" value="150">  ; Closing tree speed
  39. <param name="scrollSpeedOutGoing" value="118">  ; Opening tree speed
  40. <param name="numberOfBouncesInGoing" value="0">  ; Closing tree bounces
  41. <param name="numberOfBouncesOutGoing" value="2"> ; Opening tree bounces
  42. <param name="bounceGravity" value="20">       ; Bounce gravity percentage
  43. <param name="bounceAmplitude" value="40">     ; Bounce amplitude percentage
  44. <param name="treeFont" value="Helvetica">     ; Text Font name
  45. <param name="treeFontSize" value="14">        ; Tree font size
  46. <param name="treeBold" value="YES">           ; Text Bold ("YES" or "NO")
  47. <param name="treeItalic" value="NO">          ; Text Italic ("YES" or "NO")
  48. <param name="systemColor" value="ffff7f">     ; Scrollbars colour (hex rgb)
  49. <param name="filterColor" value="ffffff">     ; Colour considered transparent
  50. <param name="foregroundColor" value="000000"> ; Text Colour (hex rgb)
  51. <param name="backgroundColor" value="efefef">  ; Background colour (hex rgb)
  52. <param name="foregroundColorSelection" value="ffff00"> ; Selected text colour
  53. <param name="backgroundColorSelection" value="00007f"> ; Sel. txt. background
  54. <param name="autoHighLight" value="yes">  ; Mouse highlights? ("yes","no")
  55. <param name="borderStyle" value="0">      ; Border style (0=no borders,1,2)
  56. <param name="scrollBarStyle" value="0">   ; Scrollbars style (0 , 1)
  57. <param name="backImage" value="NO">       ; Background image name or "NO"
  58. <param name="floatmode" value="NO">       ; Float mode ("YES" or "NO")
  59. <param name="floatw" value="200">         ; Float window width
  60. <param name="floath" value="280">         ; Float window height
  61. <param name="floatx" value="100">         ; Float window x position start
  62. <param name="floaty" value="100">         ; Float window y position start
  63. <param name="floatitle" value="Tree Menu"> ; Float window title
  64. <param name="floatinfront" value="NO">    ; Float win. always on top (YES,NO)
  65. <param name="Icon0" value="fo_win1.gif">  ; Icon 0 image name
  66. <param name="Icon1" value="fo_win3.gif">  ; Icon 1 image name
  67. <param name="Icon2" value="ic_anfy.gif">  ; Icon 2 image name
  68. <param name="Icon3" value="ic_audio.gif"> ; Icon 3 image name
  69. ...
  70.  
  71. ; Menu example:
  72.  
  73. <param name="config0" value="0,Main,0,u">           ; Root folder
  74.                                        ; Icon: 0, link: "u" (none)
  75.  
  76. <param name="config1" value="0,Image Gallery,0,u">  ; Folder on level 0
  77. <param name="config2" value="0,Audio Files,0,u">    ; Folder on level 0
  78. <param name="config3" value="0,E-Mail,12,mailto:test@test.com">  ; Link l. 0
  79.                                       ; Icon: 0, link: mailto:test@test.com
  80.  
  81. <param name="config4" value="1,GIF Images,1,u">  ; Sub-folder, under config1
  82.                                       ; Icon: 1, link: "u" (none)
  83.  
  84. <param name="config5" value="1,JPG Images,1,u">  ; Sub-folder, under config1
  85.  
  86. <param name="config6" value="4,Flower.gif,7,test1.html">  ; Link under conf4
  87.                                       ; Icon: 7, link: test1.html
  88.  
  89. <param name="overimg" value="NO">          ; Optional image over applet
  90. <param name="overimgX" value="0">          ; Over image X offset
  91. <param name="overimgY" value="0">          ; Over image Y offset
  92. <param name="memdelay" value="1000">       ; Memory deallocation delay
  93. <param name="priority" value="3">          ; Task priority (1..10)
  94. <param name="MinSYNC" value="10">          ; Min. milliseconds/frame for sync
  95. Sorry, your browser doesn't support Java.; Message for no java browsers.
  96. </applet>                                ; End of applet tag
  97.  
  98. ***********************************************************************
  99.  
  100. INSTRUCTIONS.
  101.  
  102. The following instructions describe how to change parameters:
  103.  
  104. Attempting to change the "credits" parameter will disable the applet.
  105.  
  106. To activate the reg parameters read the shareware registration notes.
  107. In the "regcode" parameter, place the registration code you purchased 
  108. from the author. If the code is correct and the applet is run from
  109. the registered domain name, you can use "link" parameters to link to a URL
  110. when the applet is "clicked".
  111.  
  112. If you set "regnewframe" to "YES", you can specify a specific frame location
  113. for the menu links:
  114.  
  115. "_blank"  : To load the link in a new blank unnamed browser window.
  116. "_self"   : To load the link into the same window the applet occupies.
  117. "_parent" : To load the link into the immediate FRAMESET parent.
  118. "_top"    : To load the link into the top body of the window.
  119.  
  120. You can also set a custom frame name, such as "myframe1".
  121.  
  122. With the parameters "scrollSpeedInGoing" and "scrollSpeedOutGoing" you can
  123. determine the speed of tree branches closing and opening.
  124.  
  125. If you want, you can enable a bouncing effect when you open and close
  126. the branches of a tree. To control this, you set the "numberOfBouncesInGoing"
  127. and the "numberOfBouncesOutGoing", and if those are more than "0", the
  128. relative "bounceGravity" and "bounceAmplitude" have to be set. 
  129.  
  130. If you set "bounceGravity" to 50, for example, when bouncing the second time
  131. the amplitude will be 50% of the first bounce, and the third time it will
  132. be 50% of the second time, or you can say 25% of the first bounce.
  133.  
  134. The "bounceAmplitude" is the amplitude in percentages of the original
  135. bounce size. When it is set to 200, the bounce will result in twice
  136. as big as the original size.
  137.  
  138. The visual aspect of the tree can be altered determining the text font
  139. name, with "treeFont" parameter, and the style with "treeBold" and
  140. "treeItalic" parameters, which can be set to "YES" or "NO".
  141.  
  142. The font size can be changed using "treeFontSize".
  143.  
  144. The colour of the scroll bars and borders can be set with "systemColor"
  145. parameter, using an hexadecimal 0x00rrggbb format, like the one used for
  146. html, but without the leading "#".
  147.  
  148. Using same format, the background colour is controlled with "backgroundColor"
  149. parameter, the text colour with "foregroundColor" parameter.
  150.  
  151. If a background image is loaded, the "backgroundColor" parameter is ignored.
  152.  
  153. When the text is selected, "foregroundColorSelection" is the colour to be 
  154. displayed, and "backgroundColorSelection" will be the one under the
  155. selected text (if a background image is present, it will be in transparency).
  156.  
  157. An iportant parameter is "filterColor": this colour is used to filter the
  158. icon images (all them), to decide what is the TRANSPARENT COLOUR.
  159.  
  160. On the sample icons included, the transparency filter colour is "ffffff",
  161. in other terms the full white (red=255, green=255, blue=255).
  162.  
  163. Darker whites will not be considerer transparent, only this one. You can
  164. change the transparency colour filter, but then be sure to provide
  165. icon images where the selected colour has to be the transparent one.
  166.  
  167. Note: if you load transparent gif images as icons, the transparency of
  168. gif will should be considered transparent.
  169.  
  170. If you want an image as background, place it's name in the "backImage"
  171. parameter. Note: the image can be of any size, and if smaller than menu
  172. applet area, it will be TILED to fill it.
  173.  
  174. The "borderStyle" parameter determine the borders presence and style.
  175. With a value of "0", no borders are displayed.
  176. With a value of "1", the border is 1 pixel wide.
  177. With a value of "3", the border is 3 pixels wide.
  178.  
  179. The "scrollBarStyle" determine the size of scrollbars (who appears when
  180. the menu items become bigger than applet area).
  181. With a value of "0", the scrollbars are 11  pixels wide.
  182. With a value of "1", the scrollbars are 16  pixels wide.
  183.  
  184. Setting "autoHighLight" parameter to "yes", the items will be highlighted
  185. simply when mouse is over them. Setting it to "no", a click will be required
  186. to highlight an item.
  187.  
  188.  
  189. *****
  190.  
  191. The floating mode:
  192.  
  193. Optionally, you can enable the "floating window" mode.
  194. The treemenu applet, then, will appear in a floating external window, and will
  195. leave free all the other frame space on the web site.
  196. But, you still have to create a small horizontal or vertical frame (maybe
  197. 1 or 2 pixels large), containing the applet, 1 pixel large.
  198.  
  199. To enable this mode:
  200.  
  201. 1) Set "floatmode" to "YES"
  202. 2) Copy the applet width in the "floatw" parameter
  203. 3) Copy the applet height in the "floath" parameter
  204. 4) Set the applet width=1 and height=1
  205.  
  206. At this point, you just have to customize it using those parameters:
  207.  
  208. The window title must be written in the "floatitle" parameter.
  209.  
  210. The starting X and Y position where window should apper, must be written
  211. in the "floatx" and "floaty" parameters. Note: the coordinates are relative
  212. to user screen, so result can change depending on screen resolution.
  213.  
  214. If you want the window to be always on top and visible, set the "floatinfront"
  215. parameter to "YES". This could be useful for someone, and annoying for others.
  216.  
  217. Note: the "floatinfront" option will have no effect on some versions of
  218. Internet Explorer.
  219.  
  220.  
  221. *****
  222.  
  223. Menu System:
  224.  
  225. Each item needs an icon. You load all the required icons with the Icon
  226. parameters, just increase the index, there are no limitations:
  227.  
  228. <param name="Icon0" value="fo_win1.gif">  ; Icon 0 image name
  229. <param name="Icon1" value="fo_win3.gif">  ; Icon 1 image name
  230. <param name="Icon2" value="ic_anfy.gif">  ; Icon 2 image name
  231. ...
  232.  
  233. Icons can be of 2 types: FOLDER ICONS or ITEM ICONS.
  234.  
  235. The Folder Icons should be 32x16 pixels wide, made of 2 icons: the folder
  236. open and the folder closed. Just take a look at the fo_win1.gif, and
  237. other fo_*.gif samples included.
  238.  
  239. The Item Icons should be 16x16 pixels wide. Just take a look at the ic_*.gif
  240. samples included. It is possible (even if looks bad) to assign to a folder 
  241. a 16x16 Item Icon. It is not possible to assign a 32x16 Folder Icon to an 
  242. item.
  243.  
  244. The accepted formats are GIf and JPG, but GIF is more adaptable.
  245.  
  246. If you want transparent parts, assign to these the colour specified in
  247. the "filterColor" parameter.
  248.  
  249. Note: GIF transparency information should work too.
  250.  
  251.  
  252. Tree Structure:
  253.  
  254. Each config. line contains 4 parameters, separated by "," characters:
  255.  
  256. -parentId:  This value represents the number of its direct parent. Every item 
  257.             has its own Id. This Id is identical to the config line number.
  258.  
  259. -Name:      This is the Text (name)label for the item/menu.
  260.  
  261. -iconId:    The number of the icon to be used. This number is the
  262.             same number specified when loadind icons (icon0, icon1 etc.).
  263.  
  264. -Link:      The link to be opend when this item/menu is pressed.
  265.             If the item has no links, or it's a folder, specify "u", which
  266.             stands for "unlinked" (no links).
  267.  
  268. The menu has to start with "config0", the main parent, or the root.
  269. All the config parameters are sequential to this, ie.: config1, config2, etc.
  270.  
  271. Look at this example:
  272.  
  273. Main
  274.  |
  275.  |_ Image Gallery
  276.  |     |_ GIF Images
  277.  |     |     |_ Flower.gif
  278.  |     |     |_ Portrait.gif
  279.  |     |
  280.  |     |_ JPG Images
  281.  |           |_ Flower.jpg
  282.  |           |_ Portrait.jpg
  283.  |
  284.  |_ Audio Files
  285.  |     |_ Dance.wav
  286.  |     |_ Classic.wav
  287.  |
  288.  |_ E-Mail
  289.  
  290.  
  291. It should be written as:
  292.  
  293. <param name="config0" value="0,Main,0,u">           ; Root folder
  294.                                        ; Icon: 0, link: "u" (none)
  295.  
  296. <param name="config1" value="0,Image Gallery,0,u">  ; Folder on level 0
  297. <param name="config2" value="0,Audio Files,0,u">    ; Folder on level 0
  298. <param name="config3" value="0,E-Mail,12,mailto:test@test.com">  ; Link l. 0
  299.                                       ; Icon: 0, link: mailto:test@test.com
  300.  
  301. <param name="config4" value="1,GIF Images,1,u">  ; Sub-folder, under config1
  302.                                       ; Icon: 1, link: "u" (none)
  303.  
  304. <param name="config5" value="1,JPG Images,1,u">  ; Sub-folder, under config1
  305.  
  306. <param name="config6" value="4,Flower.gif,7,test1.html">  ; Link under conf4
  307.                                       ; Icon: 7, link: test1.html
  308.  
  309. <param name="config7" value="4,Portrait.gif,7,test2.html">; Link under conf4
  310.  
  311. <param name="config8" value="5,Flower.jpg,11,test6.html">  ; Link under conf5
  312. <param name="config9" value="5,Portrait.jpg,11,test7.html">; Link under conf5
  313.  
  314. <param name="config10" value="2,Dance.wav,3,test1.html">  ; Link under conf2
  315. <param name="config11" value="2,Classic.wav,3,test2.html">; Link under conf2
  316.  
  317.  
  318.